home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * LOGGING.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
-
- if (!IS_isModuleInitialized("IS.NOF.UTIL.LOGGING"))
- {
- /****h* NOF_JavaScript_Library/NOF.UTIL.LOGGING
- *
- * NAME
- * NOF.UTIL.LOGGING
- *
- * DESCRIPTION
- * The NOF.LOGGING namespace and loggers manager.
- *
- ****/
- function LOGGING() {
- this.__proto__ = LOGGING.prototype;
- this.type = IS.TYPE_NAMESPACE;
-
- this.loggers = new Array(); //actually, this is a hashtable
- }
- {
- var method = LOGGING.prototype;
- /**
- * method getLogger
- */
- method.getLogger = function getLogger (/*string*/name, /*NOF.UTIL.PropertyResourceBundle*/ bundle) {
- if ( arguments.length == 0 || name == null ) { //this should be the default logger
- name = "LOGGING.DefaultLogger";
- }
- if (this.loggers[name] == null || typeof(this.loggers[name]) == "undefined") {
- try {
- var nLogger = new LOGGING.Logger(name, bundle);
- this.loggers[name] = nLogger;
-
- } catch(e) {
- alert(""+e);
- }
- }
- return this.loggers[name];
- }
- }
-
- // add LOGGING namespace to UTIL namespace
- UTIL.__proto__.LOGGING = new LOGGING();
- }
- var LOGGING = UTIL.LOGGING;
-